<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var i = 10

    // (i %= 2)    i = i % 2  0
    var res = i++ + ++i + 5 * (i %= 2)
    //        10 + 12 + 5 * 0
    //        22

    console.log(res)  // 22
    console.log(i)  // 0
  </script>
</body>
</html>